package com.qiangesoft.bootcodegen.pojo.query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 分页参数
 *
 * @author qiangesoft
 * @date 2024-03-06
 */
@Data
@ApiModel(value = "分页参数")
public class PageQuery {

    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码最小值为1")
    @ApiModelProperty(value = "页码")
    private long pageNum = 1;

    @NotNull(message = "条数不能为空")
    @Min(value = 1, message = "条数最小值为1")
    @Max(value = 100, message = "条数最大值为100")
    @ApiModelProperty(value = "条数")
    private long pageSize = 10;
}
